#include "BreakBrick.h"

// constructor
BreakBrick::BreakBrick(int id ,float x, float y, float vx, float vy)
{
	_sprite = new Sprite(_spriteHandler, ResourceManager::GetInstance()->GetTexture(ResourceManager::GetInstance()->TextureName.Brick_Explosion),0, 0);
	_vx=vx;
	_vy=vy;
	_x = x;
	_y = y;
};

// destructor
BreakBrick::~BreakBrick()
{
	Object::~Object();
};

// override update fu5nction
void BreakBrick::Update(float dt)
{
	//m_position+=m_velocity*dt*60;
	_x += _vx * dt;
	_y += _vy * dt;
	_vy -= 0.7f;	
};
